<?php
    if(is_array($result))
	{
		header('Content-Type: application/json; Charset=UTF-8',true);
		$jsonData = array('page'=>$ordenFN->page,'total'=>$ordenFN->numeroRegistros,'rows'=>array());
		foreach ($result as $key => $obj)
		{
			$entry = array('id'=>$obj->getId(),
			    'cell'=>array(
			    
			            'soId' =>$obj->getId(),
			            'clienteNombre'=>utf8_encode($obj->getClienteNombre()),
			            'fecha'=>utf8_encode($obj->getFecha()),
			            'status'=>$obj->getStatus(),
			            'opciones'=>"<img border='0' title='Detalle Item' src='/gourmet-express/trunk/imgs/icons/application_view_list.png' onclick=fn_detalle('". $obj->getId()."') style='cursor:pointer;'><img border='0' title='Editar Item' src='/gourmet-express/trunk/imgs/icons/page_edit.png' onclick=fn_editar('". $obj->getId()."') style='cursor:pointer;'>"
			    ),
			);
			$jsonData['rows'][] = $entry;
		}
		echo json_encode($jsonData);
	}?>